<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>主产品</title>
  <link rel="stylesheet" href="../../css/reset.css">
  <link rel="stylesheet" href="../../css/common.css">
  <link rel="stylesheet" href="../../css/style.css">
  <style>
    .item {
      width: 120px;
      margin-right: 20px;
    }
    .item:nth-child(5n){
      margin-right: 0;
    }

    .item p {
      width: 120px;
      text-align: center;
    }

    .item img {
      text-align: center;
      margin: 0 15px;
    }

    .name {
      color: #fff;
      font-size: 16px;
      font-weight: bold;
    }

    .count {
      color: #f7f40a;
      font-family: ddinbold;
      font-size: 26px;
    }

  </style>

</head>
<body class="">
<div class="contain">

</div>

</body>
<script type="text/javascript" charset="utf-8" src="../../js/jquery-3.1.1.min.js"></script>
<script type="text/javascript" charset="utf-8" src="../../js/common.js"></script>
<script>
  $(function () {
    getJson('api/WEB-SQL/websql/openInterface/hxp_equip', {}, function (res) {
      // console.log(res);
      if (res.data && res.data.length) {
        let html = `<div class="fix">
          <div class="item l">
            <img src="../../img/shebeisheshi.png" alt="">
            <p class="name">设备设施</p>
            <p class="count">${(Number(res.data[0].equipQty) + Number(res.data[0].faciliQty)) || 0}</p>
          </div>
          <div class="item l">
            <img src="../../img/shebei.png" alt="">
            <p class="name">设备</p>
            <p class="count">${res.data[0].equipQty || 0}</p>
          </div>
          <div class="item l">
            <img src="../../img/sheshi.png" alt="">
            <p class="name">设施</p>
            <p class="count">${res.data[0].faciliQty|| 0}</p>
          </div>
          <div class="item l">
            <img src="../../img/tezhongshebei.png" alt="">
            <p class="name">特种设备</p>
            <p class="count">${res.data[0].specialQty || 0}</p>
          </div>
          <div class="item l">
            <img src="../../img/shebeisheshi.png" alt="">
            <p class="name">测量设备</p>
            <p class="count">${res.data[0].measQty || 0}</p>
          </div>
        </div>
        <div class="fix">
          <div class="item l">
            <img src="../../img/ziliangzongchan.png" alt="">
            <p class="name">资产总量</p>
            <p class="count">${res.data[0].assets || 0}</p>
          </div>
          <div class="item l">
            <img src="../../img/yuanzhi.png" alt="">
            <p class="name">原值(万元)</p>
            <p class="count">${res.data[0].original || 0}</p>
          </div>
          <div class="item l">
            <img src="../../img/jingzhi.png" alt="">
            <p class="name">净值(万元)</p>
            <p class="count">${res.data[0].worth || 0}</p>
          </div>
          <div class="item l">
            <img src="../../img/leijizhekou.png" alt="">
            <p class="name">累计折旧(万元)</p>
            <p class="count">${res.data[0].oldQty || 0}</p>
          </div>
          <div class="item l">
            <img src="../../img/nianzengjia.png" alt="">
            <p class="name">年增加</p>
            <p class="count">${res.data[0].annual || 0}</p>
          </div>
        </div>`;
        $('.contain').html(html);
      }
    })
  })
</script>
</html>
